#ifndef _LED_H
#define _LED_H

#include "stm32f4xx_conf.h"
#include "stm32f4xx.h"

#define LED_RED_PIN             GPIO_Pin_10
#define LED_RED_PORT            GPIOH
#define LED_RED_COLCK           RCC_AHB1Periph_GPIOH

#define LED_GREEN_PIN           GPIO_Pin_11
#define LED_GREEN_PORT          GPIOH
#define LED_GREEN_COLCK         RCC_AHB1Periph_GPIOH

#define LED_BLUE_PIN            GPIO_Pin_12
#define LED_BLUE_PORT           GPIOH
#define LED_BLUE_COLCK          RCC_AHB1Periph_GPIOH

#define LED_RED_ON              GPIO_ResetBits(LED_RED_PORT, LED_RED_PIN)
#define LED_RED_OFF             GPIO_SetBits(LED_RED_PORT, LED_RED_PIN)

#define LED_GREEN_ON            GPIO_ResetBits(LED_GREEN_PORT, LED_GREEN_PIN)
#define LED_GREEN_OFF           GPIO_SetBits(LED_GREEN_PORT, LED_GREEN_PIN)

#define LED_BLUE_ON             GPIO_ResetBits(LED_BLUE_PORT, LED_BLUE_PIN)
#define LED_BLUE_OFF            GPIO_SetBits(LED_BLUE_PORT, LED_BLUE_PIN)

#define LED_ALL_ON              GPIO_ResetBits(LED_RED_PORT, LED_RED_PIN);\
                                GPIO_ResetBits(LED_GREEN_PORT, LED_GREEN_PIN);\
                                GPIO_ResetBits(LED_BLUE_PORT, LED_BLUE_PIN)

#define LED_ALL_OFF             GPIO_SetBits(LED_RED_PORT, LED_RED_PIN);\
                                GPIO_SetBits(LED_GREEN_PORT, LED_GREEN_PIN);\
                                GPIO_SetBits(LED_BLUE_PORT, LED_BLUE_PIN)


void led_init(void);


#endif  //_LED_H